package com.jxc.controller;

import com.jxc.pojo.Menu;
import com.jxc.service.MenuService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/user")
public class MenuController {

    @Resource
    private MenuService menuService;
    @RequestMapping("/loadMenuInfo")
    public List<Menu> fingMenus(Integer parentId){
        System.out.println("--------------------菜单--------------------------");
        System.out.println("parentId=="+parentId);
        List<Menu> menus = menuService.selectByExample(parentId, 1);
        return  menus;
    }
}
